<%@ page language="java" import="java.util.*,cn.sypt.yuhao.domain.*,cn.sypt.yuhao.dao.*" pageEncoding="UTF-8"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/admin/";
			
		ArrayList al=(ArrayList)request.getAttribute("syacate");
			
		
%>

<!DOCTYPE HTML PUBLIC>
<html>
<head>
<base href="<%=basePath%>">
<title>后台管理系统</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!--[if lt IE 9]>
		<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
		<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
		<script src="Javascript/Flot/excanvas.js"></script>
	<![endif]-->
	<!-- The Fonts -->
	<link href="http://fonts.useso.com/css?family=Oswald|Droid+Sans:400,700" rel="stylesheet">
	<!-- The Main CSS File -->
	<link rel="stylesheet" href="CSS/style.css">
	<!-- jQuery -->
	<script src="Javascript/jQuery/jquery-1.7.2.min.js"></script>
	<!-- Flot -->
	<script src="Javascript/Flot/jquery.flot.js"></script>
	<script src="Javascript/Flot/jquery.flot.resize.js"></script>
	<script src="Javascript/Flot/jquery.flot.pie.js"></script>
	<!-- DataTables -->
	<script src="Javascript/DataTables/jquery.dataTables.min.js"></script>
	<!-- ColResizable -->
	<script src="Javascript/ColResizable/colResizable-1.3.js"></script>
	<!-- jQuryUI -->
	<script src="Javascript/jQueryUI/jquery-ui-1.8.21.min.js"></script>
	<!-- Uniform -->
	<script src="Javascript/Uniform/jquery.uniform.js"></script>
	<!-- Tipsy -->
	<script src="Javascript/Tipsy/jquery.tipsy.js"></script>
	<!-- Elastic -->
	<script src="Javascript/Elastic/jquery.elastic.js"></script>
	<!-- ColorPicker -->
	<script src="Javascript/ColorPicker/colorpicker.js"></script>
	<!-- SuperTextarea -->
	<script src="Javascript/SuperTextarea/jquery.supertextarea.min.js"></script>
	<!-- UISpinner -->
	<script src="Javascript/UISpinner/ui.spinner.js"></script>
	<!-- MaskedInput -->
	<script src="Javascript/MaskedInput/jquery.maskedinput-1.3.js"></script>
	<!-- ClEditor -->
	<script src="Javascript/ClEditor/jquery.cleditor.js"></script>
	<!-- Full Calendar -->
	<script src="Javascript/FullCalendar/fullcalendar.js"></script>
	<!-- Color Box -->
	<script src="Javascript/ColorBox/jquery.colorbox.js"></script>
	<!-- Kanrisha Script -->
	<script src="Javascript/kanrisha.js"></script>
	<script language="javascript">
	function checkSub()
	{
	var flag=false;
	var aname=aform.aname.value;
    if(aname.trim()=="")
    {
    window.alert("添加种类不能为空");
    }else
    {
    flag=true;
    }
	  return flag;	
	}
	</script>
	
</head>
<body>
	
<%@include file="/admin/head.jsp" %>
	<div class="wrapper contents_wrapper">
		<%@include file="/admin/left.jsp" %>
		
		<div class="contents">
			<div class="grid_wrapper">

				<div class="g_6 contents_header">
					<h3>二级分类管理</h3>
					<div><span class="label">点击进去查看三级分类</span></div>
				</div>
				
				<div class="g_12">
					<div class="widget_header">
						<h4 class="widget_header_title">二级分类管理</h4>
					</div>
					<div class="widget_contents">
						<table class="tables datatable noObOLine">
							<thead>
								<tr>
									<th>实验中分类</th>
									<th>添加</th>																															
									<th>删除</th>
								</tr>
							</thead>
							<tbody>
							<%
							for(int i=0;i<al.size();i++)
							{
							
							Acategory acate=(Acategory)al.get(i);						
							 %>
								<tr class="status_open">
									<td><a href=/sypt/ManagerServlet?flag=sybcategl&aid=<%=acate.getAid() %>><%=acate.getAname() %></a></td>																									 
									 <td><a href="syacatexg.jsp?aid=<%=acate.getAid() %>&aname=<%=acate.getAname() %>">修改</a></td>																	
									<td><a href=/sypt/ManagerServlet?flag=syacategl&flag1=dl&aid=<%=acate.getAid() %>>删除</a></td>
								</tr>
								
								<%								
								}
								 %>								
							</tbody>
						</table>
					</div>
					<form action="/sypt/ManagerServlet?flag=syacategl&flag1=tj" name="aform" method="post">
						<div class="line_grid">
							<div class="g_3"><span class="label">添加种类</span></div>
							
								<input class="simple_field" type="text" name="aname" id="aname"/>
							<input type="submit" onclick="return checkSub();" value="提交">
						</div>
						</form>
						
				</div>
				<div class="g_12 separator"><span></span></div>
				<!-- Chats -->
				
				
			</div>		
		</div>
	</div>
	<jsp:include flush="true" page="foot.jsp"></jsp:include>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>